The 'itlm' Resource
The 'itlm' Resource
New with system software version 7.0, the 'itlm' resource specifies the
preferred sorting order for script codes, language codes, and region codes. It
also indicates the default language for each script, the parent script for each
language, and the parent language for each region.
The resource contains a header and three tables. The header includes the
version number, format code, and offsets to the three tables.
The first table, scriptData, contains a list of script codes in their
preferred sorting order. Each script is paired with the default language
code for that script. The max script code specifies the highest script
code that will be handled by the internal
Script Manager structures derived from this table. For example, a
max script code of smUninterp(32) would cover the scripts with codes
0 through 32.
The second table, langData, consists of a list of language codes in their
preferred sorting order. Each language code is paired with the code for
its parent script. The max language code specifies the highest language
code that will be handled by the internal
Script Manager structures derived from this table. For example, a
max language code of langRussian(32) would cover the languages with
codes 0 through 32.
The third table, regionData, is a list of region codes in their preferred
sorting order. Each region code is paired with the code for its parent
language. The max region code specifies the highest region code that
will be handled by the internal Script Manager structures derived
from this table. For example, a max region code of verPakistan(34)
would cover the regions with codes 0 through 34.
The code example below shows the Rez format for the 'itlm' resource.
Code example:Multiscript mapping and sorting
type 'itlm' {
unsigned hex integer; //version number
unsigned hex integer; //format code
unsigned integer = 3; [TOKEN:12079]number of offset/length pairs
unsigned longint = scriptData >> 3; //offset to scriptData table
unsigned longint = (endScriptData - scriptData) >> 3;
//length of it
unsigned longint = langData >> 3; //offset to langData table
unsigned longint = (endLangData - langData) >> 3;
//length of it
unsigned longint = regionData >> 3; //offset to regionData table
unsigned longint = (endRegionData - regionData) >> 3;
//length of it
scriptData:
integer Script; //max script code for script->lang mapping
integer Language; //default lang code for scripts not in table
integer = $$CountOf( scriptArray);//number of entries in table
array scriptArray {//entries are ordered by script sort order
integer Script; [TOKEN:12079]script code
integer Language; [TOKEN:12079]default lang code for script };
endScriptData:
langData:
integer Language; //max lang code for lang->script mapping
integer Script; //default script code for langs not in table
integer = $$CountOf(langArray);//number of entries in table
array langArray {//entries are ordered by lang sort order
integer Language; [TOKEN:12079]language code
integer Script; [TOKEN:12079]parent script code for language
};
endLangData:
regionData:
integer Region; //max region code for region->lang mapping
integer Language; //default lang code for regions not in table
integer = $$CountOf( regionArray);//number of entries in table
array regionArray { //entries are ordered by region sort order
integer Region; [TOKEN:12079]region code
integer Language; [TOKEN:12079]parent language code for region
};
endRegionData:
};
The Table below lists a sample hierarchy of script, language, and region codes
reflected in the 'itlm' resource. Region codes do not currently exist for all
language codes. See Script Manager Data for details.
Script, language, and region codes
Script code Language code Region code
smRoman langEnglish verUS
verBritain
verAustralia
langFrench verFrance
verFrCanada
verFrSwiss
langGerman verGermany
verGrSwiss
langItalian verItaly
langDutch verNetherlands
langSwedish verSweden
langSpanish verSpain
langDanish verDenmark
langPortuguese verPortugal
langNorwegian verNorway
langFinnish verFinland
langIcelandic verIceland
langMaltese verMalta
langTurkish verTurkey
langLithuanian verLithuania
langEstonian verEstonia
langLettish verLatvia
langLappish verLapland
langFaeroese verFaeroeIsl
langCroatian verYugoCroatian
smEastEurRoman langPolish verPoland
langHungarian verHungary
smGreek langGreek verGreece
smCyrillic langRussian verRussia
smArabic langArabic verArabic
langUrdu verPakistan
langFarsi verIran
smHebrew langHebrew verIsrael
smDevanagari langHindi verIndiaHindi
smThai langThai verThailand
smJapanese langJapanese verJapan
smTradChinese langTradChinese verTaiwan
smSimpChinese langSimpChinese verChina
smKorean langKorean verKorea